<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="path" value="${pageContext.request.contextPath}" />
<!DOCTYPE html>
<html lang="en">
 <head>
  <meta charset="UTF-8" />
  <title>Document</title>
  <link rel="stylesheet" type="text/css" href="${path }/static/css/address.css"/>
  <script type="text/javascript" src="${path }/static/js/jquery.address.js"></script>
 </head>
 <body>
  <div class="border_top_cart">
   <div class="container"> 
    <div class="checkout-box"> 
     
      <div class="checkout-box-bd"> 
       <input type="hidden" name="Checkout[addressState]" id="addrState" value="0"/> 
       <div class="xm-box"> 
        <div class="box-hd "> 
         <h2 class="title">收货地址</h2> 
        </div> 
        <div class="box-bd"> 
         <div class="clearfix xm-address-list" id="checkoutAddrList"> 
         <c:forEach items="${list }" var="list">
          <dl class="item"> 
           <dt> 
            <strong class="itemConsignee">${list.name }</strong> 
            <span class="itemTag tag">${list.alabel }</span> 
           </dt> 
           <dd> 
            <p class="tel itemTel">${list.phonenum }</p> 
            <p class="itemRegion">${list.province } ${list.zone } ${list.zone2 }</p> 
            <p class="itemStreet">${list.stree }</p> 
            <p>${list.zipcode }</p>
            <a href="${path }/ToUpdateAddress?id=${list.id }&userid=${userid}">编辑</a>
             <li class="list_op"> <p class="del"><a href="${path }/DoDeleteAddress?userid=${userid }&id=${list.id }" class="delBtn">删除</a></p> </li>
           </dd> 
           <dd style="display:none"> 
            <input type="radio" name="Checkout[address]" class="addressId" value="10140916720030323"/>
           </dd>
          </dl>
          </c:forEach>
          <div class="item use-new-addr" id="J_useNewAddr" data-state="off">
           <span class="iconfont icon-add"><img src="${path }/static/images/add_cart.png" /></span> 使用新地址
          </div>
         </div>
         <input type="hidden" name="newAddress[type]" id="newType" value="common" />
         <input type="hidden" name="newAddress[consignee]" id="newConsignee" />
         <input type="hidden" name="newAddress[province]" id="newProvince" />
         <input type="hidden" name="newAddress[city]" id="newCity" />
         <input type="hidden" name="newAddress[district]" id="newCounty" />
         <input type="hidden" name="newAddress[address]" id="newStreet" />
         <input type="hidden" name="newAddress[zipcode]" id="newZipcode" />
         <input type="hidden" name="newAddress[tel]" id="newTel" />
         <input type="hidden" name="newAddress[tag_name]" id="newTag" />
    <form  action="${path }/DoAddAddress" method="get">
    <input type="hidden" value="${userid }" name="userid"/>
         <div class="xm-edit-addr-box" id="J_editAddrBox">
          <div class="bd"> 
           <div class="item"> 
            <label>收货人姓名<span>*</span></label>
            <input type="text" name="name" id="Consignee" class="input" placeholder="收货人姓名" maxlength="15" autocomplete="off" /> 
            <p class="tip-msg tipMsg"></p> 
           </div> 
           <div class="item"> 
            <label>联系电话<span>*</span></label> 
            <input type="text" name="phonenum" class="input" id="Telephone" placeholder="11位手机号" autocomplete="off" /> 
            <p class="tel-modify-tip" id="telModifyTip"></p> 
            <p class="tip-msg tipMsg"></p> 
           </div> 
           <div class="item"> 
            <label>地址<span>*</span></label> 
            <select name="province" id="Provinces" class="select-1"> <option>省份/自治区</option> </select> 
            <select name="zone" id="Citys" class="select-2" disabled=""> <option>城市/地区/自治州</option> </select> 
            <select name="zone2" id="Countys" class="select-3" disabled=""> <option>区/县</option> </select> 
            <textarea name="stree" class="input-area" id="Street" placeholder="路名或街道地址，门牌号"></textarea> 
            <p class="tip-msg tipMsg"></p> 
           </div> 
           <div class="item"> 
            <label>邮政编码<span>*</span></label> 
            <input type="text" name="zipcode" id="Zipcode" class="input" placeholder="邮政编码" autocomplete="off" /> 
            <p class="zipcode-tip" id="zipcodeTip"></p> 
            <p class="tip-msg tipMsg"></p> 
           </div> 
           <div class="item"> 
            <label>地址标签<span>*</span></label> 
            <input type="text" name="alabel" id="Tag" class="input" placeholder="地址标签：如&quot;家&quot;、&quot;公司&quot;。限5个字内" /> 
            <p class="tip-msg tipMsg"></p> 
           </div> 
          </div> 
          <div class="ft clearfix"> 
           <button type="button" class="btn btn-lineDake btn-small " id="J_editAddrCancel">取消</button> 
           <input type="submit" class="btn btn-primary  btn-small " id="" /> 
          </div>
         </div>
         </form>
         <!--点击弹出新增/收货地址界面end-->
         <div class="xm-edit-addr-backdrop" id="J_editAddrBackdrop"></div> 
        </div>
       </div>
       <!-- 收货地址 END-->
       <div id="checkoutPayment">
        <!-- 支付方式 -->
        <div class="xm-box">
         <div class="box-hd ">
          <h2 class="title">支付方式</h2>
         </div>
         <div class="box-bd">
          <ul id="checkoutPaymentList" class="checkout-option-list clearfix J_optionList">
           <li class="item selected"> <input type="radio" name="Checkout[pay_id]" checked="checked" value="1" /> <p> 在线支付 <span></span> </p> </li>
           <li class="item"> <input type="radio" name="Checkout[pay_id]" checked="checked" value="" /> <p> 货到付款 <span></span> </p> </li> 
          </ul> 
         </div> 
        </div> 
        <!-- 支付方式 END--> 
        <div class="xm-box"> 
         <div class="box-hd "> 
          <h2 class="title">配送方式</h2> 
         </div> 
         <div class="box-bd"> 
          <ul id="checkoutShipmentList" class="checkout-option-list clearfix J_optionList"> 
           <li class="item selected"> <input type="radio" data-price="0" name="Checkout[shipment_id]" checked="checked" value="1" /> <p> 快递配送（10元） <span></span> </p> </li> 
          </ul> 
         </div> 
        </div> 
       </div> 
       <!-- 送货时间 --> 
       <div class="xm-box"> 
        <div class="box-hd"> 
         <h2 class="title">送货时间</h2> 
        </div> 
        <div class="box-bd"> 
         <ul class="checkout-option-list clearfix J_optionList"> 
          <li class="item selected"><input type="radio" checked="checked" name="Checkout[best_time]" value="1" /><p>不限送货时间<span>周一至周日</span></p></li>
          <li class="item "><input type="radio" name="Checkout[best_time]" value="2" /><p>工作日送货<span>周一至周五</span></p></li>
          <li class="item "><input type="radio" name="Checkout[best_time]" value="3" /><p>双休日、假日送货<span>周六至周日</span></p></li> 
         </ul> 
        </div> 
       </div> 

       <div id="checkoutInvoice"> 
        <div class="xm-box"> 
         <div class="box-hd"> 
          <h2 class="title">发票信息</h2> 
         </div> 
         <div class="box-bd"> 
          <ul class="checkout-option-list checkout-option-invoice clearfix J_optionList J_optionInvoice"> 
           <li class="hide"> 电子个人发票 </li> 
           <li class="item selected">
           <input type="radio" checked="checked" value="4" name="Checkout[invoice]" /> <p>电子发票（非纸质）</p> </li>
          </ul>
          <p id="eInvoiceTip" class="e-invoice-tip "> 电子发票是税务局认可的有效凭证，可作为售后维权凭据，不随商品寄送。</p> 
          <div class="invoice-info nvoice-info-1" id="checkoutInvoiceElectronic" style="display:none;"> 
           <p class="tip">电子发票目前仅对个人用户开具，不可用于单位报销 ，不随商品寄送。</p> 
           <p>发票内容：购买商品明细</p>
           <p>发票抬头：个人</p>
           <p> <span class="hide"><input type="radio" value="4" name="Checkout[invoice_type]" checked="checked" id="electronicPersonal" class="invoiceType" /></span> </p>
           <dl> 
            <dt>
             什么是电子发票?
            </dt> 
            <dd>
             · 电子发票是纸质发票的映像，是税务局认可的有效凭证，与传统纸质发票具有同等法律效力，可作为售后维权凭据。
            </dd> 
            <dd>
             · 开具电子服务于个人，开票后不可更换纸质发票，不可用于单位报销。
            </dd>  
           </dl> 
           <p></p> 
          </div> 
      </div> 
       <form id="checkoutForm" action="#" method="post">
      <div class="checkout-box-ft">
       <div id="checkoutGoodsList" class="checkout-goods-box">
        <div class="xm-box">
         <div class="box-hd">
          <h2 class="title">确认订单信息</h2>
         </div>
         <div class="box-bd">
          <dl class="checkout-goods-list">
           <dt class="clearfix">
            <span class="col col-1">商品名称</span>
<span class="col col-2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 购买价格</span>
            <span class="col col-3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;小计</span>
           </dt>
           <dd class="item clearfix">
           
           <c:forEach items="${lc }" var="lc">
            <div class="item-row">
             <div class="col col-1">
              <div class="g-pic">
               <img src="${path }/static/images/${lc.image }.jpg" width="40" height="40" />
              </div>
              <div class="g-info">
               <a href="#"> ${lc.com_name } </a>
              </div>
             </div>
             <div class="col col-2">
${lc.price }
             </div>
             <div class="col col-3">
${lc.price }
             </div>
            </div>
            </c:forEach>
          </dl> 
          <div class="checkout-count clearfix"> 
           <div class="checkout-price"> 
            <ul> 
             <li> 订单总额：<span>1597元</span> </li> 
             <li> 活动优惠：<span>0元</span>
             <script type="text/javascript">
                 checkoutConfig.activityDiscountMoney=0;
                 checkoutConfig.totalPrice=244.00;
             </script>
             </li> 
             <li> 优惠券抵扣：<span id="couponDesc">0元</span></li> 
             <li> 运费：<span>10元</span></li>
            </ul>
            <p class="checkout-total">应付总额：<span><strong>1597</strong>元</span></p> 
           </div>
          </div> 
         </div> 
        </div> 
       </div>
       <div class="checkout-confirm"> 
        <a href="${path }/ToShoppingCart?userid=${userid }" class="btn btn-lineDakeLight btn-back-cart">返回购物车</a> 
        <input type="submit" class="btn btn-primary" value="立即下单" id="checkoutToPay" /> 
       </div> 
      </div> 
     </form>
    </div>  
   </div>
  </div>
 </body>
 <script type="text/javascript">
    var checkoutConfig={
        addressMatch:'common',
        addressMatchVarName:'data',
        hasPresales:false,
        hasBigTv:false,
        hasAir:false,
        hasScales:false,
        hasGiftcard:false,
        totalPrice:244.00,
        postage:10,
        postFree:true,
        bcPrice:150,
        activityDiscountMoney:0.00,
        showCouponBox:0,
        invoice:{
            NA:"0",
            personal:"1",
            company:"2",
            electronic:"4"
        }
    };
    var miniCartDisable=true;
</script>
<script id="newAddrTemplate" type="text/x-dot-template">
        <dl class="item selected" data-isnew="true" data-consignee="{{=it.consignee}}" data-tel="{{=it.tel}}" data-province="{{=it.province}}" data-provincename="{{=it.provinceName}}" data-city="{{=it.city}}" data-cityname="{{=it.cityName}}" data-county="{{=it.county}}" data-countyname="{{=it.countyName}}" data-zipcode="{{=it.zipcode}}" data-street="{{=it.street}}" data-tag="{{=it.tag}}">
            <dt>
                <strong class="itemConsignee">{{=it.consignee}}</strong>
                {{? it.tag }}
                    <span  class="itemTag tag">{{=it.tag}}</span>
                {{?}}
            </dt>
            <dd>
                <p class="tel itemTel">{{=it.tel}}</p>
                <p  class="itemRegion">{{=it.provinceName}} {{=it.cityName}} {{=it.countyName}}</p>
                <p  class="itemStreet">{{=it.street}} ({{=it.zipcode}})</p>
                <span class="edit-btn J_editAddr">编辑</span>
            </dd>
        </dl>
</script> 

</html>